package com.qibao.toolkit.exception.strategy.factory;

import com.qibao.toolkit.exception.strategy.ExceptionHandleStrategy;

import java.util.Map;
import java.util.Set;

/**
 * @author wangcheng
 * @version $Id: ExceptionHandleStrategyFactory.java, v0.1 2018/9/27 8:44 wangcheng Exp $$
 */
public interface ExceptionHandleStrategyHolder {


    /**
     * 通过异常获取异常处理策略
     */
    ExceptionHandleStrategy getStrategyByThrowable(Throwable throwable);


    /**
     * 获取异常和策略的map信息
     */
    Map<Class<? extends Throwable>, ExceptionHandleStrategy> getStrategyMap();

    /**
     * 获取扫描到的要处理的异常类型
     */
    Set<Class<? extends Throwable>> getThrowableTypes();

    /**
     * 获取扫描到的策略对象
     */
    Set<ExceptionHandleStrategy> getStrategies();

}
